﻿using System;
using System.Collections.Generic;

namespace Caramel.Entities.Scaffolding.Metadata
{
	[Serializable()]
	public class Table
	{
		public Table()
		{
			this.PrimaryKeys = new List<PrimaryKey>();
			this.Columns = new List<IColumn>();
			this.Relations = new List<Relation>();
		}

		public string Name { get; set; }

		public string PluralizedName { get; set; }

		public string SingularizedName { get; set; }

		public Schema Schema { get; set; }

		public List<PrimaryKey> PrimaryKeys { get; set; }

		public List<IColumn> Columns { get; set; }

		public List<Relation> Relations { get; set; }

		public override string ToString()
		{
			return this.Name;
		}
	}
}
